from flask import Flask
from sqlheper2 import db

app = Flask(__name__)


@app.route('/login')
def login():
    db.fetchone()
    return 'xxx'


@app.route('/index')
def index():
    db.fetchall()
    return 'xxx'


@app.route('/order')
def order():
    conn, cursor = db.open()
    # 自己做操作逻辑
    db.close(conn, cursor)
    return 'xxx'


if __name__ == '__main__':
    app.run()